﻿namespace Authentication.Data.DBConfig
{
    using Authentication.Configuration;
    using Authentication.Model.Model;
    using System.Data.Entity.ModelConfiguration;
    public class UserConfiguration : EntityTypeConfiguration<User>
    {
        public UserConfiguration()
        {
            ToTable("User", SystemConfiguration.Schema);
            HasKey(k => new { k.ApplicationKey, k.UserName });
            Property(c => c.UserName).HasMaxLength(128).IsRequired();
            Property(c => c.Password).HasMaxLength(256).IsRequired();
            Property(c => c.Email).HasMaxLength(256).IsRequired();
        }
    }
}
